//
//  MVData.m
//  __PRODUCTNAME__
//
//  Created by QC.L on 16/08/15
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "MVData.h"
#import "MVShowPlay.h"
#import "MVContents.h"

@implementation MVData

+ (NSDictionary *)objectClassInArray{
    return @{@"mv_show_play" : [MVShowPlay class]};
}

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"contents"]) {
        _contents = [MVContents modelWithDic:value];
    }
    if ([key isEqualToString:@"mv_show_play"]) {
        NSMutableArray *showPlayArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            MVShowPlay *showPlay = [MVShowPlay modelWithDic:dic];
            [showPlayArray addObject:showPlay];
        }
        _mv_show_play = showPlayArray;
    }
}


@end
